/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.network.serverpackets;

import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
 * Format: ch ddcdc
 * @author  KenM
 */
public class ExPCCafePointInfo extends L2GameServerPacket
{
	private static final String _S__FE_32_EXPCCAFEPOINTINFO = "[S] FE:32 ExPCCafePointInfo [ddcdc]";
	
	private int _PcPoints;
    private int _addPoint;
    private int _subPoint;
    //private long _acquirementTime;//Hour
    //private int _acquirement;
	
	public ExPCCafePointInfo(L2Character activChar,int add,int sub)
	{
		L2PcInstance player = (L2PcInstance)activChar;
		
		_PcPoints = player.getPcPoint();
		_addPoint = add;
		_subPoint = sub;
		//_acquirementTime = player.getAcquirementTimeByHour();//Hour
		//_acquirement = player.getAcquirement();
	}
	
	/**
     * @param pcPoints
     * @param i
     * @param b
     * @param c
     * @param j
     */
    public ExPCCafePointInfo(int pcPoints, int i, boolean b, boolean c, int j)
    {
	    // TODO Auto-generated constructor stub
    }

	/**@param sysmsg 
	 * 1705	1	PC방 포인트 획득기간입니다. 포인트 획득기간은 $s1시간 남았습니다.	0	B09B79			0	0	0	0	0		none
	 1706	1	PC방 포인트 사용기간입니다. 포인트 사용기간은 $s1시간 남았습니다.	0	B09B79			0	0	0	0	0		none
	 1707	1	PC방 포인트 $s1포인트를 획득하였습니다.	0	B09B79			0	0	0	0	0		none
	 1708	1	더블 포인트! PC방 포인트 $s1포인트를 획득하였습니다.	0	B09B79			0	0	0	0	0		none
	 1709	1	$s1포인트를 사용합니다.	0	B09B79			0	0	0	0	0		none
	 1710	1	적립된 포인트가 부족합니다.	0	B09B79			0	0	0	0	0		none
	 1711	1	PC방 포인트 사용기간이 종료되었습니다.	0	B09B79			0	0	0	0	0		none
	 1712	1	PC방 포인트 획득기간이 종료되었습니다.	0	B09B79			0	0	0	0	0		none
	 */
	@Override
	protected void writeImpl()
	{
		writeC(0xFE);
		writeH(0x32);
		
		writeD(_PcPoints);//포인트
		
		writeD(_addPoint);//획득 포인트 패킷
		writeC(_subPoint);//
		
		writeD(255);//획득 사용 가능 시간 hour
		writeC(1);//획득기간 0 : disable 1: enable
		//writeD((int)_acquirementTime);//획득 사용 가능 시간 hour
		//writeC(_acquirement);//획득기간 0 : disable 1: enable
	}

	@Override
	public String getType()
	{
		return _S__FE_32_EXPCCAFEPOINTINFO;
	}
}
